package cn.liuhaihua.web.util;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Random;
import java.util.Scanner;
 
public class Lottery_ticket {
 
	// 随机生成大乐透 前区 01-35 取5个数 后区01-12 取2个数
	public static void SC() {
 
		List<Integer> Front_zone = new ArrayList();
		Random r = new Random();
		for (int i = 0; i < 5; i++) {
			int ran1 = r.nextInt(32) + 1;
			if (i == 0) {
				Front_zone.add(ran1);
			} else {
				for (int t = 0; t < Front_zone.size(); t++) {
					if (ran1 == Front_zone.get(t)) {
						i--;
						break;
					} else {
						if (Front_zone.size() == t + 1) {
							Front_zone.add(ran1);
							break;
						}
					}
				}
 
			}
		}
 
		List<Integer> Back_zone = new ArrayList();
		Random r2 = new Random();
		for (int i = 0; i < 2; i++) {
			int ran1 = r2.nextInt(11) + 1;
			if (i == 0) {
				Back_zone.add(ran1);
			} else {
				for (int t = 0; t < Back_zone.size(); t++) {
					if (ran1 == Back_zone.get(t)) {
						i--;
						break;
					} else {
						if (Back_zone.size() == t + 1) {
							Back_zone.add(ran1);
							break;
						}
					}
				}
 
			}
		}
		Collections.sort(Front_zone);
		Collections.sort(Back_zone);
		System.err.println("祝您喜中头奖！！！  前区：" + Front_zone.toString() + ";  后区：" + Back_zone.toString());
	}
 
	public static void main(String[] args) {
		System.out.println("请输入购买大乐透注数！！！");
		Scanner in = new Scanner(System.in);
		int t = in.nextInt();
		for (int i = 0; i < t; i++) {
			SC();
		}
	}
}